home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 June / ccd0605.iso / Software / Shareware / Programare / winhex / Boot Sector NTFS.txt < prev    next >
Text File  |  2005-05-02  |  1KB  |  45 lines

  1. template "Boot Sector NTFS"
  2.  
  3. // To be applied to sector 0 of an NTFS-formatted
  4. // logical drive or to the mirror copy of the boot
  5. // sector, which will be located near the end of
  6. // the partition.
  7.  
  8. description "Boot sector of an NTFS partition"
  9. applies_to disk
  10. sector-aligned
  11.  
  12. requires 0x00    "EB"                     // bytes 0 to 2 are
  13. requires 0x02    "90"                    // JMP instruction
  14. requires 0x03    "4E 54 46 53 20"    // ID must be "NTFS"
  15. requires 0x1FE    "55 AA"                // "magic" signature
  16.  
  17. begin
  18.     read-only hex 3    "JMP instruction"            //00
  19.     char[8]                "SystemID"                    //03
  20.     uint16                "Bytes per sector"        //0B
  21.     uint8                    "Sectors per cluster"    //0D
  22.     uint16                "Reserved sectors"        //0E
  23.     hex 3                    "(always zero)"            //10
  24.     read-only hex 2    "(unused)"                    //13 
  25.     hex 1                    "Media descriptor"        //15
  26.     read-only hex 2    "(unused)"                    //16
  27.     uint16                "Sectors per track"        //18
  28.     uint16                "Heads"                        //1A
  29.     uint32                "Hidden Sectors"            //1C
  30.     read-only hex 4    "(unused)"                    //20
  31.     read-only hex 4    "(always 80 00 80 00)"    //24
  32.     int64                    "Total sectors"            //28
  33.     int64                    "Start C# $MFT"            //30
  34.     int64                    "Start C# $MFTMirr"        //38
  35.     uint32                "Clust per MFT rec"        //40
  36.     uint32                "Clust per index block"    //44
  37.     hex 4                    "32-bit serial number (hex)"
  38.     move -4
  39.     hexadecimal uint32 "32-bit SN (hex, reversed)"
  40.     move -4
  41.     hex 8                    "64-bit serial number (hex)"
  42.     uint32                "Checksum"                    //50
  43.     goto 0x1FE            //boot load code follows
  44.     read-only hex 2    "Signature (55 AA)"        //1FE
  45. end